﻿@model EmrDatastructure.EmrProblem
@{
    ViewBag.Title = "Edit";
}
@if (false) 
{      
    <script src="@Url.Content("~/Scripts/jquery-1.4.4-vsdoc.js")" type="text/javascript"></script>  
} 
<h2>
    Edit</h2>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>EmrProblem</legend>
        @Html.HiddenFor(model => model.EmrDemographicId)
        @Html.HiddenFor(model => model.Id)
        @Html.HiddenFor(model => model.VersionNumber)
        <div class="editor-label">
            @Html.LabelFor(model => model.Snomed_CT)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Snomed_CT)
            @Html.ValidationMessageFor(model => model.Snomed_CT)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Status)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Status)
            @Html.ValidationMessageFor(model => model.Status)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.DateDiagnosed)
        </div>
        <div class="editor-field">
            @* @Html.EditorFor(model => model.DateDiagnosed) *@
            <input class="text-box single-line" data-val="true" data-val-required="The DateDiagnosed field is required." id="DateDiagnosed" name="DateDiagnosed" type="text" value="@Model.DateDiagnosed.ToString("d")" />
            @Html.ValidationMessageFor(model => model.DateDiagnosed)
        </div>
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}
<div>
    @Html.ActionLink("Back to List", "Index")
</div>
<script type="text/javascript">
    $(function () {
        $("#DateDiagnosed").datepicker({
            showOn: "button",
            buttonImage: '@Url.Content("~/Content/images/calendar.gif")',
            buttonImageOnly: true
        });
        //'/MvcEmrRazor/Lookups/SnowMedDescription',
        $("#Description").autocomplete({
            source: '@Url.Action("SnowMedDescription", "Lookups")',
            minLength: 1
        });
        $("#Snomed_CT").ForceNumericOnly();
    });
</script>
